package com.mycinema.biz.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mycinema.biz.MovieBiz;
import com.mycinema.dao.MovieDao;
import com.mycinema.entity.Movie;

@Service("movieBiz")
public class MovieBizImpl implements MovieBiz {

	@Autowired
	private MovieDao movieDao;
	
	public List<Movie> getMovies(int id, int cid, String title, int start, int pageSize) {
		return movieDao.getMovies(id, cid,  title,start,pageSize);
	}

	public int fetchMovieRows(int id, int cid, String title) {
		return movieDao.fetchMovieRows(id, cid, title);
	}

	public Movie fetchById(int id) {
		return movieDao.fetchById(id);
	}

	public void update(Movie movie) {
		movieDao.update(movie);
	}

	public void add(Movie movie) {
		movieDao.add(movie);
	}

	public List<Movie> getAll() {
		// TODO Auto-generated method stub
		return movieDao.getAll();
	}

}
